import org.apache.spark.{SparkConf, SparkContext}

object Map {
  def main(args: Array[String]): Unit = {
    val conf = new SparkConf().setAppName("MapTest").setMaster("local[*]")
    val sc = new SparkContext(conf)

    val disData = sc.parallelize(List(1, 3, 45, 3, 76))
    val sq_dist = disData.map(x => x * x)
    println(sq_dist.collect().mkString(","))
  }
}